#ifndef SBR_H_
#define SBR_H_

#include "recbase.h"
#include "rectype.h"
#include "stdffield.h"

namespace opsrc {
    namespace stdf {

        class Sbr : public opsrc::stdf::RecBase
        {
        public:
            Sbr(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf);
            virtual ~Sbr();

            const StdfField<int> getHeadNum() const;
            void setHeadNum(StdfField<int> headnum);

            const StdfField<int> getSiteNum() const;
            void setSiteNum(StdfField<int> sitenum);

            const StdfField<int> getSbinNum() const;
            void setSbinNum(StdfField<int> sbinnum);

            const StdfField<long> getSbinCount() const;
            void setSbinCount(StdfField<long> hbincnt);

            const StdfField<string> getSbinPassFail() const;
            void setSbinPassFail(StdfField<string> sbinpf);

            const StdfField<string> getSbinName() const;
            void setSbinName(StdfField<string> sbinnam);

            void readFields(char *buf);

        protected:
            Sbr();

        private:
            StdfField<int> head_num;		// 1u
            StdfField<int> site_num;		// 1u
            StdfField<int> sbin_num;		// 2u
            StdfField<long> sbin_cnt;		// u4
            StdfField<string> sbin_pf;		// c1
            StdfField<string> sbin_nam;		// cn
            endian en;
            bool decodeFields;
        };

    }	// namespace stdf
}		// namespace opsrc

#endif /*SBR_H_*/
